package Year2021.month10.Day21.Day29Interface;


public class Computer  {
    private String brand;

    private Cpu cpu;//安装Cpu
    private HardDisk hardDisk;//安装硬盘
    private Memory memory;//安装内存

    public String getBrand() {
        return brand;
    }

    public Cpu getCpu() {
        return cpu;
    }

    public HardDisk getHardDisk() {
        return hardDisk;
    }

    public Memory getMemory() {
        return memory;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setCpu(Cpu cpu) {

        this.cpu = cpu;
    }

    public void setHardDisk(HardDisk hardDisk) {

        this.hardDisk = hardDisk;
    }

    public void setMemory(Memory memory) {
        this.memory = memory;
    }


    public  void show(){
        System.out.println("这是个"+brand+"电脑！"+"有着"+cpu.show()+"Cpu进行处理数据"+"用"+memory.show()+"内存条传输数据到"
                +hardDisk.show()+ "GB的硬盘里！");
    }
}
